Yii2 By Example by Caldarelli Fabrizio

Yii2 By Example by Caldarelli Fabrizio

Author:Caldarelli, Fabrizio
Language: eng
Format: epub, azw3
Publisher: Packt Publishing
Published: 2015-09-28T16:00:00+00:00


Note

Make sure that the View Path has a slash (/) in the path and not a backslash (\) as the namespaced path in the model class, search model class, and controller class.

The following screenshot shows the fields filled out to generate CRUD actions for the Room model class:

CRUD Generator from Gii

While navigating in the folder structure, you will see that Gii has created three new files in basic/controllers, named RoomsWithGiiController.php, ReservationsWithGiiController.php, and CustomersWithGiiController.php.

Each of these files contains five actions:

actionCreate(): This action is used to create a new model object

actionView(): This action is used to view the details of a model object

actionUpdate(): This action is used to update an existing model object

actionDelete(): This action is used to delete an existing model object

actionIndex(): This action is used to display, using the grid layout, a list of model objects



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.